#include <stdio.h>

int main(int argc, char const *argv[])
{
    int a = 12;
    int b = 8;
    int max = a>b?a:b;
    int min = a>b?b:a;
    int i=min;
    while(i>0){
        if(a%i==0&&b%i==0){
            printf("%d",i);
            break;
        }
        i--;
    }
    }
    
